package com.zxy.designpattern.observerpattern;

import java.util.EventObject;

/**
 * LifecycleEvent.
 * 
 * Created by zxybird on 17/1/17.
 */
public class LifecycleEvent extends EventObject {

  private Object data = null;

  private Lifecycle lifecycle = null;

  private String type = null;

  public LifecycleEvent(Object source) {
    super(source);
  }

  public LifecycleEvent(Lifecycle lifecycle, String type, Object source) {
    super(source);
    this.lifecycle = lifecycle;
    this.type = type;
  }

  public LifecycleEvent(Object source, Object data, Lifecycle lifecycle, String type) {
    super(source);
    this.data = data;
    this.lifecycle = lifecycle;
    this.type = type;
  }

  public Object getData() {
    return data;
  }

  public void setData(Object data) {
    this.data = data;
  }

  public Lifecycle getLifecycle() {
    return lifecycle;
  }

  public void setLifecycle(Lifecycle lifecycle) {
    this.lifecycle = lifecycle;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }
}
